package cn.yto.print.sqlite.dao;

import cn.yto.print.model.dto.PrintHistoryDTO;
import cn.yto.print.model.request.HistoryQueryRequest;
import cn.yto.print.sqlite.domain.PrintHistoryDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PrintHistoryMapper {

    int batchInsert(List<PrintHistoryDO> printHistoryList);

    long selectCount(@Param("request") HistoryQueryRequest request);

    List<PrintHistoryDTO> selectByPage(@Param("request") HistoryQueryRequest request, @Param("offset") int offset, @Param("limit") int limit);

    int updateDynamic(PrintHistoryDO printHistory);

    int updatePrintStatus(@Param("documentIds") List<String> documentIds, @Param("printStatus") Integer printStatus);

    int deleteById(Long id);

    int deleteBatch(@Param("ids") List<Long> ids);

    void deleteByCondition(@Param("expireTime") String expireTime);

    void clearPrintHistory();

}
